Integrating ACFS Snapshots With RMAN

Comments 0

Share to social media

In my last article, I demonstrated that starting with Oracle Grid Infrastructure 12c (12.1), Oracle Cloud File system (ASM Cluster File System in cluster environment) supports database files (database version 11.2.0.4 and up) in addition to general purpose files, so that entire Oracle databases can be stored inside Oracle Cloud FS. In addition, for a database with its files stored on Oracle Cloud file system, Oracle ACFS Snapshots may serve as point-in-time backups of the database which can be used for online recovery of database files.

In this article, I will demonstrate that ACFS snapshots can be integrated with RMAN and hence employed to perform complete recovery using RMAN RESTORE / RECOVER commands, thereby complementing RMAN functionality.

Currently I am working in an Oracle Database 12.1.0.2 cluster environment and have created a database named cfsdb, with all of its files stored on the cloud file system as shown below:

Let’s confirm that the database cfsdb is in archivelog mode

Create a test table HR.EMP with 107 rows in EXAMPLE tablespace:

Verify that currently there are no snapshots of the cloud file system hosting the database files:

Take snapshot (example_dbsnap) of the cloud file system while the database is in backup mode:

Check that all the datafiles, control file and spfile are available in snapshot:

Insert records in hr.emp so that it has 214 rows:

Simulate loss of datafile for EXAMPLE tablespace:

Locate the datafile for EXAMPLE tablespace in snapshot example_dbsnap:

Copy datafile for EXAMPLE tablespace from snapshot and attempt to bring EXAMPLE tablespace online:

Employ RMAN to perform complete recovery using archived logs in FRA:

Thus, we have been able to perform complete recovery by employing:

  • OS commands to copy the datafile from the snapshot example_dbsnap taken while the database was in backup mode.
  • RMAN RECOVER command to perform complete recovery using Archived logs stored in FRA (/mnt/acfs).

Now, let us explore if we can catalog the datafile copies stored in the snapshot with RMAN and hence employ RMAN for RESTORE as well as RECOVER.

Catalog all the files in the snapshot example_dbsnap in directory “/mnt/acfs/.ACFS/snaps/example_dbsnap/oradata/cfsdb/”

It can be seen that all the datafile copies have been catalogued whereas SPfile and controlfile have not been registered with RMAN.

Now we will again simulate the loss of datafile for the EXAMPLE tablespace, and then we’ll attempt to employ RMAN for RESTORE as well RECOVER.

Simulate loss of datafile for EXAMPLE tablespace:

Restore EXAMPLE tablespace from the catalogued datafile copy in the snapshot using RMAN and attempt to bring EXAMPLE tablespace online:

Employ RMAN to perform complete recovery using archived logs in FRA:

Thus, we have been able to perform complete recovery by employing:

  • RMAN RESTORE command to RESTORE the datafile from the snapshot example_dbsnap taken while the database was in backup mode.
  • RMAN RECOVER command to perform complete recovery using Archived logs stored in FRA (/mnt/acfs).

Conclusion:

  • Starting with Oracle Grid Infrastructure 12c (12.1), ACFS supports database files in cluster environment so that entire Oracle databases can be stored inside a cloud file system.
  • ACFS snapshots taken while the database is in backup mode can be integrated with RMAN and employed to perform complete recovery using RMAN RESTORE / RECOVER commands.

Load comments

About the author